﻿using System;

namespace Sustainalytics.Utils
{
    public class CustomException : Exception
    {
        public int? InternalCode { get; set; }

       public new dynamic Data { get; set; }

        public CustomException(int code, string message) : base(message) 
        { 
            InternalCode = code; 
        }

        public CustomException(int code, dynamic data, string message) : base(message) 
        { 
            InternalCode = code; 
            this.Data = data; 
        }

        public CustomException(int code, string message, Exception innerEx) : base(message, innerEx) 
        { 
            InternalCode = code; 
        }

        public CustomException(int code, dynamic data, string message, Exception innerEx)
            : base(message, innerEx)
        {
            InternalCode = code;
            this.Data = data;
        }
    }
}
